package com.puzzlebazar.client.main.model;

import java.util.HashMap;
import java.util.List;

import com.google.gwt.user.client.rpc.AsyncCallback;
import com.puzzlebazar.client.puzzleinfo.PuzzleInfo;
import com.puzzlebazar.client.user.UserInfo;

public interface PuzzleListInfo {

	/**
	 * Access the name of this puzzle list, to display as a link or in a title
	 * 
	 * @return The name of this puzzle list
	 */
	public String getName();
	
	/**
	 * Access the type of this puzzle list, a simple identifier
	 * 
	 * @return The type of this puzzle list
	 */
	public String getType();	
	
	/**
	 * Call the service that can be used to fill this puzzle list
	 * 
	 * @param callback The callback to use when the list has been filled
	 */
	public void callService( AsyncCallback< List<PuzzleInfo> > callback );

	/**
	 * @return The parameters to uniquely describe this puzzle list info
	 */
	public HashMap<String, String> getParams();	


	/**
	 * @return True if the user is supposed to be able to get this list
	 */
	public boolean canUserGetList(UserInfo userInfo);
	
}
